package com.mall.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.dubbo.mapper.CmsPrefrenceAreaMapper;
import com.mall.model.domain.CmsPrefrenceArea;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author xyiaao
 * @description 针对表【cms_prefrence_area(优选专区)】的数据库操作Api实现
 * @createDate 2022-03-29 19:46:09
 */
@DubboService
public class CmsPrefrenceAreaApiImpl extends ServiceImpl<CmsPrefrenceAreaMapper, CmsPrefrenceArea>
        implements CmsPrefrenceAreaApi {

    @Autowired
    private CmsPrefrenceAreaMapper prefrenceAreaMapper;

    @Override
    public List<CmsPrefrenceArea> findAll() {

        LambdaQueryWrapper<CmsPrefrenceArea> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.isNotNull(CmsPrefrenceArea::getId);

        List<CmsPrefrenceArea> cmsPrefrenceAreas = prefrenceAreaMapper.selectList(queryWrapper);
        return cmsPrefrenceAreas;
    }

}




